package Demo1299.Demo4;

import java.lang.reflect.Method;

/**
 * @Author:LiRegin
 * @Date: 2019/12/8 16:32:32
 */
public class Test {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("Demo1299.Demo4.Student");
        Object o = aClass.getConstructor(String.class, int.class).newInstance("憨憨", 23);
        Method show = aClass.getMethod("show");
        Object invoke = show.invoke(o);
        System.out.println(invoke);
    }
}
